<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>File Export</title>
</head>
<body bgcolor="#99CCFF">

	<f:view>

		<center>
			<h:form>
				<h:commandButton type="submit" value="Home"
						action="userMainMenu" />
					<h:commandButton type="submit" value="Logout"
						action="logout?faces-redirect=true" />
			</h:form>
		</center>

		<br />
		<hr />
		<br />


		<h:form>
		<center>
			<h:outputText value="Populate all Tables from the Database:" />&nbsp; &nbsp; 
			<h:commandButton id="populate"
				action="#{tableListBean.populateTables}" value="POPULATE" />
			<br><br>
			<h:panelGrid>
				<h:selectOneMenu value="#{tableListBean.tableName}">
				<h:outputText value="Select a Table to Export as CSV file :" />&nbsp; &nbsp; 
					<f:selectItems value="#{tableListBean.tableNames}" />
				</h:selectOneMenu>
				<h:outputText rendered="#{messageBean.errorMessage}" value="#{messageBean.message}" />
			</h:panelGrid>
			<br><br>
			&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <h:commandButton id="export"
				action="#{actionBeanFile.processDataExport}" value="EXPORT" />
				</center>
		</h:form>
	</f:view>
</body>
</html>